<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>正则表达式的量词</title>
    <script>
        /* 
            量词
                {m} 正好m个，量词只对前面的起作用
                {m,}至少m个
                {m,n}m-n个
                +   表示1个以上，就相当于{1，}
                *   表示可有可无
                ?   相当于{0,1}



                ab{3}=abbb
                (ab){3}=ababab
                re=^[a-z]{1,}
        */
       let re=/aa/
        re=/a{2}/ 
        
        re2=/(ab){3}$/
        re3=/^[a-z]{1,}$/
       console.log(re.test("2a2a2a"));
       console.log(re2.test("ababab"))
       console.log(re3.test("a"))
    </script>
</head>
<body>
    
</body>
</html>